<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link href="__CSS__/style.css" rel="stylesheet">
</head>
<body>
    <div class="container">
        <div class="col-sm-offset-2 col-sm-8">
            <div class="panel panel-default">
                <div class="panel-heading">
                    图书列表
                    {volist name = "$book" id="vo"}
                    <a href='{:url('Index/add',array('id'=>$vo.id))}'>
                        {/volist}
                        <button class="btn btn-primary add" style="margin-left: 20px">新增</button>
                        
                    </a>
                  
                </div>
                <div class="panel-body">
                    <table class="table table-striped task-table">
                        <thead>
                            <tr>
                                <th>ID</th>
                                <th>图书名称</th>
                                <th>分类</th>
                                <th>价格</th>
                                <th>出版日期</th>
                                <th>操作</th>
                            </tr>
                        </thead>
                        <tbody>
                            <!-- {foreach name = "$book" id="vo"} -->
                            {volist name = "$book" id="vo"}
                            <tr>
                                <td class="table-text">
                                    {$vo.id}
                                </td>
                                <td class="table-text">
                                    {$vo.name}
                                </td>
                                <td class="table-text">
                                    {$vo.category}
                                </td>
                                <td class="table-text">
                                    {$vo.price }
                                </td>
                                <td>
                                    {$vo.publish_time}
                                </td>
                                <td>
                                    <a href='{:url('Index/edit',array('id'=>$vo.id))}'>
                                        <button class="btn btn-info edit">编辑</button>
                                    </a>
                                    <a href='{:url('Index/delete1',array('id'=>$vo.id))}'>
                                        <button class="btn btn-danger delete">删除</button>
                                    </a>
                                </td>
                            </tr>
                            {/volist}
                        </tbody>
                    </table>
    
                </div>
            </div>
        </div>
    </div>

</body>
</html>